<div class="module-third" :class="{'module-third-center': !isRegister}">
    <template v-if="isLoading">
        <div class="m-loading-box">
            <loading></loading>
        </div>
    </template>

    <div class="web-logo">
        <img class="web-img" src="../../img/logo-black.png" height="30">
        <span class="web-text">Achain數字資產導入</span>
        <img class="web-img" src="./img/achain.png" height="30">
    </div>

    <template v-if="isLoading === false && isVerify">
        <!--<template v-if="false">-->
        <web-box title="Sign Up">
            <div>
                <div class="third-title">ACT資產導入認證</div>
                <validator :rules="rules" :parent="_self">
                    <form class="m-form-page m-form-login" name="form" action="javascript:;">
                        <div class="col-row fn-flex">
                            <label class="row-title">中國聚幣網賬號（Email or Phone）</label>
                            <input type="text"
                                   tabindex="1"
                                   placeholder="中國聚幣網賬號"
                                   name="email"
                                   v-model="form.email"
                                   class="input">
                            <div class="ui-tip"></div>
                        </div>
                        <div class="col-row fn-flex">
                            <label class="row-title">圖形驗證</label>
                            <input type="text"
                                   tabindex="2"
                                   placeholder="輸入驗證碼"
                                   name="identifyingPic"
                                   maxlength="4"
                                   autocomplete="off"
                                   v-model="form.identifyingPic"
                                   class="input-left">
                            <div class="ui-tip"></div>
                            <div class="comp-verify-code">
                                <a href="javascript:;">
                                    <img :src="imgCodeSrc" @click="changeImgCode()" width="112" height="36">
                                </a>
                            </div>
                        </div>
                        <div class="col-row fn-flex">
                            <label class="row-title">通訊驗證</label>
                            <input type="text"
                                   tabindex="3"
                                   placeholder="輸入驗證碼"
                                   name="identifyingCode"
                                   maxlength="6"
                                   autocomplete="off"
                                   v-model="form.identifyingCode"
                                   class="input-left">
                            <div class="ui-tip"></div>
                            <div class="comp-verify-code">
                                <a href="javascript:;"
                                   v-if="form.sendingCode===false"
                                   class="ui-btn ui-btn--block link"
                                   @click="sendCodeVerify()"
                                   :disabled="form.codeLock === true"> {{form.codeBtnText}}</a>
                                <a href="javascript:;"
                                   v-if="form.sendingCode===true"
                                   class="ui-btn ui-btn--block link"
                                   disabled>等待中...</a>
                            </div>
                        </div>
                        <div class="col-row" style="color: #115db0">認證通過後您需要進行註冊，註冊完成後系統將會自動導入您的ACT資產</div>
                        <div class="col-row">
                            <button type="submit"
                                    @click="submit()"
                                    v-if="isRequesting === false"
                                    class="ui-btn ui-btn--block">提交認證
                            </button>
                            <button type="submit"
                                    disabled
                                    v-if="isRequesting === true"
                                    class="ui-btn ui-btn--block">等待中...
                            </button>
                        </div>
                    </form>
                    <div class="success-box" v-if="verifySuccess">
                        認證通過，您賬戶的剩餘<span v-for="item in assetList">{{item.assetCode}}為{{item.assetCodeAmount}}個&nbsp;&nbsp;&nbsp;</span>
                    </div>
                </validator>
            </div>
        </web-box>
    </template>

    <!--<template v-if="true">-->
    <template v-if="isRegister">
        <web-box title="Set asset password" class="flipInX">
            <div class="third-title">OurDax賬戶註冊</div>
            <validator :rules="pwdRules" :parent="_self">
                <form class="m-form-page m-form-login" name="pwdFrom" action="javascript:;">
                    <div class="col-row fn-flex">
                        <label class="row-title">郵箱</label>
                        <input type="text"
                               tabindex="1"
                               placeholder="請輸入郵箱"
                               name="email"
                               v-model="pwdFrom.email"
                               class="input">
                        <div class="ui-tip"></div>
                    </div>
                    <div class="col-row fn-flex">
                        <label class="row-title">圖形驗證</label>
                        <input type="text"
                               tabindex="2"
                               placeholder="輸入驗證碼"
                               name="identifyingPic"
                               maxlength="4"
                               autocomplete="off"
                               v-model="pwdFrom.identifyingPic"
                               class="input-left">
                        <div class="ui-tip"></div>
                        <div class="comp-verify-code">
                            <a href="javascript:;">
                                <img :src="imgCodeSrc" @click="changeImgCode()" width="112" height="36">
                            </a>
                        </div>
                    </div>
                    <div class="col-row fn-flex">
                        <label class="row-title">郵箱驗證碼</label>
                        <input type="text"
                               tabindex="3"
                               placeholder="驗證碼"
                               name="identifyingCode"
                               maxlength="6"
                               autocomplete="off"
                               v-model="pwdFrom.identifyingCode"
                               class="input-left">
                        <div class="ui-tip"></div>
                        <div class="comp-verify-code">
                            <a href="javascript:;"
                               v-if="pwdFrom.sendingCode===false"
                               class="ui-btn ui-btn--block link"
                               @click="sendCodeRegister()"
                               :disabled="pwdFrom.codeLock === true"> {{pwdFrom.codeBtnText}}</a>
                            <a href="javascript:;"
                               v-if="pwdFrom.sendingCode===true"
                               class="ui-btn ui-btn--block link"
                               disabled>等待中...</a>
                        </div>
                    </div>
                    <div class="col-row fn-flex">
                        <label class="row-title">登錄密碼</label>
                        <input type="password"
                               tabindex="4"
                               placeholder="請輸入登錄密碼"
                               v-model="pwdFrom.logPsd"
                               name="logPsd"
                               ref="logPsd"
                               @focus="checkPsd"
                               @blur="checkPsdBlur"
                               autocomplete="off"
                               class="input">
                        <div class="ui-tip"></div>
                    </div>
                    <div class="col-row fn-flex">
                        <label class="row-title">確認密碼</label>
                        <input type="password"
                               tabindex="5"
                               placeholder="確認密碼"
                               name="logConfirmPsd"
                               v-model="pwdFrom.logConfirmPsd"
                               class="input">
                        <div class="ui-tip"></div>
                    </div>
                    <div class="col-row fn-flex">
                        <label class="row-title">資金密碼</label>
                        <input type="password"
                               tabindex="6"
                               autocomplete="off"
                               placeholder="請輸入資金密碼"
                               name="payPsd"
                               ref="payPsd"
                               v-model="pwdFrom.payPsd"
                               @focus="checkPayPsd"
                               @blur="checkPayPsdBlur"
                               class="input">
                        <div class="ui-tip"></div>
                    </div>
                    <div class="col-row fn-flex">
                        <label class="row-title">確認密碼</label>
                        <input type="password"
                               placeholder="確認密碼"
                               tabindex="7"
                               name="payConfirmPsd"
                               v-model="pwdFrom.payConfirmPsd"
                               class="input">
                        <div class="ui-tip"></div>
                    </div>
                    <div class="col-row">
                        <button type="submit"
                                tabindex="8"
                                @click="totalSubmit"
                                v-if="isRegisting === false"
                                class="ui-btn ui-btn--block">
                            確認并註冊
                        </button>
                        <button type="submit"
                                disabled
                                v-if="isRegisting === true"
                                class="ui-btn ui-btn--block">
                            等待中...
                        </button>
                    </div>
                </form>
            </validator>
        </web-box>
    </template>

    <template v-if="allSuccess">
        <register-success></register-success>
        <a href="https://www.ourdax.com/hk/login.html" class="ui-btn ui-btn--block ui-btn--big">{{ leftSeconds }}s 後自動進入登錄頁...</a>
        <!--<a href="http://gdae2.dev.gpdax.com/hk/login.html" class="ui-btn ui-btn&#45;&#45;block ui-btn&#45;&#45;big">{{ leftSeconds }}s 後自動進入登錄頁...</a>-->
    </template>
</div>
